#include <ALEstd.h>
#include <EventManager.h>

static IEventManager* g_pEventMgr = NULL;

IEventManager* IEventManager::Get()
{
	//TODO: debug
	return g_pEventMgr;
}

IEventManager::IEventManager(const char* pName, bool global)
{
	if(global)
	{
		if (g_pEventMgr)
		{
			//TODO: error
			delete g_pEventMgr;
		}
		g_pEventMgr = this;
	}
}

IEventManager::~IEventManager()
{
	if(g_pEventMgr == this)
		g_pEventMgr = NULL;
}